package cz.proks.easyhelpdesk.gwt.ui.cell;

import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.ui.InlineHyperlink;

import cz.proks.easyhelpdesk.api.model.Filter;

public class SimpleFilterCell extends AbstractCell<Filter> {

    @Override
    public void render(com.google.gwt.cell.client.Cell.Context context, Filter value, SafeHtmlBuilder sb) {
        if (value == null)
            return;
                
        InlineHyperlink link = new InlineHyperlink(value.getName(), "#");
        link.setStyleName("eh-simple-main-value");
     
        sb.appendHtmlConstant(link.getHTML());
    }
}
